Skip to content

fix: trust env for proxies in asyncio#429

Merged
nibalizer merged 1 commit intomainfrom
nibz/trust_env
Sep 30, 2025
Merged

fix: trust env for proxies in asyncio#429
nibalizer merged 1 commit intomainfrom
nibz/trust_env

Conversation

@nibalizer
Copy link
Contributor

@nibalizer nibalizer commented Sep 30, 2025

Pull Request Description

What and why?

fix: trust env for proxies in asyncio
https://docs.aiohttp.org/en/stable/client_advanced.html#aiohttp-client-proxy-support

How to test

What needs special review?

Dependencies, breaking changes, and deployment notes

Release notes

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@nibalizer nibalizer added the internal Not to be externalized in the release notes label Sep 30, 2025
@github-actions
Copy link
Contributor

PR Summary

This PR enhances the API client by modifying the session creation logic in the _get_session function. It adds the parameter trust_env=True to the aiohttp.ClientSession initialization. With this change, the client session will now respect environment variables such as proxy settings. This allows the application to automatically adapt to different deployment environments that rely on system-configured proxies or other settings provided via environment variables.

Test Suggestions

  • Test API connectivity in an environment where proxy settings are provided via environment variables to ensure the session honors these settings.
  • Verify that the API client behaves as expected both with and without relevant environment variables set.
  • Run integration tests to ensure that no unintended side effects occur in production environments with diverse network configurations.

Copy link
Contributor

@johnwalz97 johnwalz97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@nibalizer nibalizer merged commit 168b81f into main Sep 30, 2025
19 checks passed
@nibalizer nibalizer deleted the nibz/trust_env branch September 30, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants